<template>
	<view>
		<view class="detailedBox" v-for="(ele,ind) in listData" v-if="listData.length>0 && isShow==true" :key="ind">
			<view class="detailedBoxItem">
				<view>
					<view>提现金额</view>
					<view>¥{{ele.OPT_AMOUNT}}</view>
				</view>
				<view>
					<view>手续费</view>
					<view>¥{{ele.FEE}}</view>
				</view>
				<view>
					<view>实际到账金额</view>
					<view>¥{{ele.REAL_WITHDRAW}}</view>
				</view>
				<view>
					<view>提现后余额</view>
					<view>¥{{ele.AFTER_OPT_AMOUNT}}</view>
				</view>
				<view>
					<view>提现账户</view>
					<view>{{ele.WITHDRAW_ACCOUNT}}</view>
				</view>
				<view>
					<view>日期</view>
					<view>{{ele.OPT_TIME}}</view>
				</view>
				<view>
					<view>状态</view>
					<view>
						<text v-if="ele.ACCOUNT_TYPE==1">退回</text>
						<text v-if="ele.ACCOUNT_TYPE==2">未审核</text>
						<text v-if="ele.ACCOUNT_TYPE==3">已审核</text>
					</view>
				</view>
				<view>
					<view>备注</view>
					<view>{{ele.MEMO}}</view>
				</view>
				<view>
					<view>是否退回</view>
					<view v-if="ele.IS_BACK==0">--</view>
					<view v-if="ele.IS_BACK==1">已退回</view>
				</view>
				<view>
					<view>退回备注</view>
					<view>{{ele.BACK_MEMO}}</view>
				</view>
			</view>
		</view>
		<view v-if="listData.length == 0 && isShow==true">
			<emptyPage title="暂无提现申请～"></emptyPage>
		</view>
	</view>
</template>

<script>
	import {
		getCashManageData
	} from '@/api/directSelling.js'
	import emptyPage from '@/components/emptyPage.vue'
	export default {
		components: {
			emptyPage
		},
		data() {
			return {
				isShow:false,
				listData: []
			}
		},
		created() {
			uni.showLoading({
				title: '查询中',
				mask: true
			});
			this.getCashManageData();
		},
		methods: {
			getCashManageData() {
				getCashManageData({
					pageSize: 20,
					pageNumber: 1
				}).then((res) => {
					let data = res.data.rows;
					this.listData = data;
					this.isShow=true;
					uni.hideLoading();
				}).catch((err) => {

				})
			}
		}
	}
</script>

<style lang="scss">
	body,
	page {
		background: #fff;
		padding: 20rpx 30rpx;
		box-sizing: border-box;
	}

	.detailedBox {
		width: 100%;
		height: auto;
		padding: 20rpx 30rpx;
		box-sizing: border-box;
		box-shadow: 0px 0px 10px #e6e6e6;
		border-radius: 21rpx;
		margin-bottom: 30rpx;

		.detailedTotal {
			text-align: center;

			.amount {
				font-size: 56rpx;
				font-weight: bold;
				margin-top: 25rpx;
				margin-bottom: 20rpx;
			}
		}

		>view.detailedBoxItem>view {
			display: flex;
			justify-content: space-between;
			line-height: 45rpx;
			font-size: 30rpx;
			margin-top: 25rpx;
		}
	}
</style>
